//
//  MSCustomerMatchingTableVC.m
//  SocietySale
//
//  Created by Mike on 16/11/18.
//  Copyright © 2016年 Mike. All rights reserved.
//

#import "MSCustomerMatchingTableVC.h"
#import "MSCustomerMatchingCell.h"

@interface MSCustomerMatchingTableVC ()
@property (nonatomic, strong) NSMutableArray *sectionTitleArr;
@end

@implementation MSCustomerMatchingTableVC

- (void)viewDidLoad{
    [super viewDidLoad];
    self.sectionTitleArr = [NSMutableArray arrayWithObjects:@"B",@"W", nil];
}

//- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
//    return self.dataArray.count;
//}

//- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
//    return [self.dataArray[section] count];
//}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *cellId = @"cellId";
    MSCustomerMatchingCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
    if (!cell) {
        cell = [[MSCustomerMatchingCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellId];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    if (indexPath.row == [self.dataArray count]-1) {
        cell.horizonLineView.frame = CGRectMake(0, 109.4, SCREEN_WIDTH, 0.6);
    }
    else{
        cell.horizonLineView.frame = CGRectMake(12, 109.4, SCREEN_WIDTH-24, 0.6);
    }
    cell.model = self.dataArray[indexPath.row];
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 110;
}

//- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
//    return 30.0f;
//}
//
//- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
//    UIView *headerView = [[UIView alloc] init];
//    headerView.backgroundColor = kDefaultViewBackgroundColor;
//    headerView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 30);
//    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, SCREEN_WIDTH-30, 30)];
//    label.textAlignment = NSTextAlignmentLeft;
//    label.textColor = kDarkGrayColor;
//    label.font = [UIFont fontWithName:@"STHeitiSC-Light" size:14];
//    label.text = self.sectionTitleArr[section];
//    [headerView addSubview:label];
//    return headerView;
//}

@end
